package com.wanxi.extend;

public class Student extends Worker {
    private String name;
    private Integer age;

    public Student() {
        super("aa", 1);
//        super();
        System.out.println("Student无参数的构造方法");
    }

    public Student(String name, Integer age) {
        super("aa", 2);
        System.out.println("Student有参数的构造方法");
        this.name = name;

        this.age = age;

    }

    public Student(String name, Integer age, String name1, Integer age1) {
        super(name, age);
        this.name = name1;
        this.age = age1;
    }

    public void study() {
        System.out.println("努力学习");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String work(String name) {
        System.out.println("aaa");
        return "";
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
